<?php 

/**
* 验证码类
*/
class Code 
{

	public $width=200;
	public $height=50;
	public $gr=0;
	
	function __construct(argument)
	{
		# code...
	}


	public function show()
	{
		header('Content-type: image/png');

		$this->huefangkuai(40);

		


	}

	public function huefangkuai($value='')
	{
		for ($i=0; $i <20 ; $i++) { 
		$color = imageColorAllocate($res,mt_rand(0,255),mt_rand(0,255),mt_rand(0,255));

		$x = mt_rand(0,400);
		$y = mt_rand(0,200);
		$x1=$x+10;
		$y1=$y+10;

		imageFilledRectangle($res,$x,$y,$x1,$y1,$color);
	}
	}
}










 ?>